<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>Tekdaqc Firmware: ADC State Machine</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customstyle.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Tekdaqc Firmware
   &#160;<span id="projectnumber">1.0.2.0</span>
   </div>
   <div id="projectbrief">The firmware of the Tekdaqc.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__adc__statemachine.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">ADC State Machine<div class="ingroups"><a class="el" href="group__tekdaqc__firmware.html">Tekdaqc Firmware</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:gae8acd7c093ba943ff020756662d8e282"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__adc__statemachine.html#gae8acd7c093ba943ff020756662d8e282">ADC_State_t</a> { <br/>
&#160;&#160;<a class="el" href="group__adc__statemachine.html#ggae8acd7c093ba943ff020756662d8e282ac1bd0f71a88c6a0448812f5c9bfabc82">ADC_UNINITIALIZED</a>, 
<a class="el" href="group__adc__statemachine.html#ggae8acd7c093ba943ff020756662d8e282a3dd35159e362e102ff3857defd2ee5ec">ADC_INITIALIZED</a>, 
<a class="el" href="group__adc__statemachine.html#ggae8acd7c093ba943ff020756662d8e282ad44134e74eaafda748b36b62b64b3ffb">ADC_CALIBRATING</a>, 
<a class="el" href="group__adc__statemachine.html#ggae8acd7c093ba943ff020756662d8e282a1ce1ead9375dee706ff6e8df4012e845">ADC_GAIN_CALIBRATING</a>, 
<br/>
&#160;&#160;<a class="el" href="group__adc__statemachine.html#ggae8acd7c093ba943ff020756662d8e282aa37cde1dabf7658cc9bb359dc7ad7ce8">ADC_IDLE</a>, 
<a class="el" href="group__adc__statemachine.html#ggae8acd7c093ba943ff020756662d8e282ac39ce4086e8ea9dbbbe721d237b0e58d">ADC_CHANNEL_SAMPLING</a>, 
<a class="el" href="group__adc__statemachine.html#ggae8acd7c093ba943ff020756662d8e282a49f30e17bd4e0529efe8855e9dc163bc">ADC_RESET</a>, 
<a class="el" href="group__adc__statemachine.html#ggae8acd7c093ba943ff020756662d8e282a09bb7081acebf276c0dd4ada41696612">ADC_EXTERNAL_MUXING</a>
<br/>
 }</td></tr>
<tr class="memdesc:gae8acd7c093ba943ff020756662d8e282"><td class="mdescLeft">&#160;</td><td class="mdescRight">ADC state machine state definitions. Defines all the possible states for the ADC state machine to be in.  <a href="group__adc__statemachine.html#gae8acd7c093ba943ff020756662d8e282">More...</a><br/></td></tr>
<tr class="separator:gae8acd7c093ba943ff020756662d8e282"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaf9ab485b0fb6ddf69c8bfb43597ab06b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__adc__statemachine.html#gaf9ab485b0fb6ddf69c8bfb43597ab06b">ADC_Machine_Create</a> (void)</td></tr>
<tr class="memdesc:gaf9ab485b0fb6ddf69c8bfb43597ab06b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create the ADC state machine.  <a href="#gaf9ab485b0fb6ddf69c8bfb43597ab06b">More...</a><br/></td></tr>
<tr class="separator:gaf9ab485b0fb6ddf69c8bfb43597ab06b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaabf53da7a14f298b049ed2ad432b0ed6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__adc__statemachine.html#gaabf53da7a14f298b049ed2ad432b0ed6">ADC_Machine_Init</a> (void)</td></tr>
<tr class="memdesc:gaabf53da7a14f298b049ed2ad432b0ed6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the ADC state machine.  <a href="#gaabf53da7a14f298b049ed2ad432b0ed6">More...</a><br/></td></tr>
<tr class="separator:gaabf53da7a14f298b049ed2ad432b0ed6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7eb6744d5738bf35b1cb86b44cdc99ad"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__adc__statemachine.html#ga7eb6744d5738bf35b1cb86b44cdc99ad">ADC_Calibrate</a> (void)</td></tr>
<tr class="memdesc:ga7eb6744d5738bf35b1cb86b44cdc99ad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform a self zero calibration.  <a href="#ga7eb6744d5738bf35b1cb86b44cdc99ad">More...</a><br/></td></tr>
<tr class="separator:ga7eb6744d5738bf35b1cb86b44cdc99ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga91d632b5c373982d2554840a65e89758"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__adc__statemachine.html#ga91d632b5c373982d2554840a65e89758">ADC_GainCalibrate</a> (PhysicalAnalogInput_t input)</td></tr>
<tr class="memdesc:ga91d632b5c373982d2554840a65e89758"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform a system gain calibration on the specified input.  <a href="#ga91d632b5c373982d2554840a65e89758">More...</a><br/></td></tr>
<tr class="separator:ga91d632b5c373982d2554840a65e89758"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga89889fc7c9dba41da2ab451fe5e06d68"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__adc__statemachine.html#ga89889fc7c9dba41da2ab451fe5e06d68">ADC_Machine_Service</a> (void)</td></tr>
<tr class="memdesc:ga89889fc7c9dba41da2ab451fe5e06d68"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform a periodic service of the state machine.  <a href="#ga89889fc7c9dba41da2ab451fe5e06d68">More...</a><br/></td></tr>
<tr class="separator:ga89889fc7c9dba41da2ab451fe5e06d68"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6424732e3475cc653a8e7cd3598555f5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__adc__statemachine.html#ga6424732e3475cc653a8e7cd3598555f5">ADC_Machine_Halt</a> (void)</td></tr>
<tr class="memdesc:ga6424732e3475cc653a8e7cd3598555f5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Halt any current operations and return the idle state.  <a href="#ga6424732e3475cc653a8e7cd3598555f5">More...</a><br/></td></tr>
<tr class="separator:ga6424732e3475cc653a8e7cd3598555f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac1ea03f0a36d3488bfb5c728b118942c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__adc__statemachine.html#gac1ea03f0a36d3488bfb5c728b118942c">ADC_Machine_Idle</a> (void)</td></tr>
<tr class="memdesc:gac1ea03f0a36d3488bfb5c728b118942c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Idle state handler.  <a href="#gac1ea03f0a36d3488bfb5c728b118942c">More...</a><br/></td></tr>
<tr class="separator:gac1ea03f0a36d3488bfb5c728b118942c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga979620e2e4743c8f5d1f053a90705841"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__adc__statemachine.html#ga979620e2e4743c8f5d1f053a90705841">ADC_Machine_Input_Sample</a> (<a class="el" href="struct_analog___input__t.html">Analog_Input_t</a> **inputs, uint32_t count, <a class="el" href="group__data__types.html#ga0ecf26b576b9a54eca656b9be7ba6a06">bool</a> singleChannel)</td></tr>
<tr class="memdesc:ga979620e2e4743c8f5d1f053a90705841"><td class="mdescLeft">&#160;</td><td class="mdescRight">Input sampling state handler.  <a href="#ga979620e2e4743c8f5d1f053a90705841">More...</a><br/></td></tr>
<tr class="separator:ga979620e2e4743c8f5d1f053a90705841"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga82e1537e4763ba13d894276ab9de1cd7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__adc__statemachine.html#ga82e1537e4763ba13d894276ab9de1cd7">ADC_Machine_Reset</a> (void)</td></tr>
<tr class="memdesc:ga82e1537e4763ba13d894276ab9de1cd7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reset state handler.  <a href="#ga82e1537e4763ba13d894276ab9de1cd7">More...</a><br/></td></tr>
<tr class="separator:ga82e1537e4763ba13d894276ab9de1cd7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafdb90e36c49985480868585799f00b22"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__adc__statemachine.html#gafdb90e36c49985480868585799f00b22">ADC_External_Muxing</a> (void)</td></tr>
<tr class="memdesc:gafdb90e36c49985480868585799f00b22"><td class="mdescLeft">&#160;</td><td class="mdescRight">External multiplexer switch handler.  <a href="#gafdb90e36c49985480868585799f00b22">More...</a><br/></td></tr>
<tr class="separator:gafdb90e36c49985480868585799f00b22"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="gae8acd7c093ba943ff020756662d8e282"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__adc__statemachine.html#gae8acd7c093ba943ff020756662d8e282">ADC_State_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggae8acd7c093ba943ff020756662d8e282ac1bd0f71a88c6a0448812f5c9bfabc82"></a>ADC_UNINITIALIZED</em>&#160;</td><td class="fielddoc">
<p>The state machine is in an invalid, uninitialized state. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggae8acd7c093ba943ff020756662d8e282a3dd35159e362e102ff3857defd2ee5ec"></a>ADC_INITIALIZED</em>&#160;</td><td class="fielddoc">
<p>The state machine is in a valid, initialized state. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggae8acd7c093ba943ff020756662d8e282ad44134e74eaafda748b36b62b64b3ffb"></a>ADC_CALIBRATING</em>&#160;</td><td class="fielddoc">
<p>The state machine is calibrating itself. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggae8acd7c093ba943ff020756662d8e282a1ce1ead9375dee706ff6e8df4012e845"></a>ADC_GAIN_CALIBRATING</em>&#160;</td><td class="fielddoc">
<p>The state machine is gain calibrating. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggae8acd7c093ba943ff020756662d8e282aa37cde1dabf7658cc9bb359dc7ad7ce8"></a>ADC_IDLE</em>&#160;</td><td class="fielddoc">
<p>The state machine is idling, keeping the ADC warm. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggae8acd7c093ba943ff020756662d8e282ac39ce4086e8ea9dbbbe721d237b0e58d"></a>ADC_CHANNEL_SAMPLING</em>&#160;</td><td class="fielddoc">
<p>The state machine is configured for sampling analog inputs. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggae8acd7c093ba943ff020756662d8e282a49f30e17bd4e0529efe8855e9dc163bc"></a>ADC_RESET</em>&#160;</td><td class="fielddoc">
<p>The state machine is resetting. It will return to IDLE after reset completes. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggae8acd7c093ba943ff020756662d8e282a09bb7081acebf276c0dd4ada41696612"></a>ADC_EXTERNAL_MUXING</em>&#160;</td><td class="fielddoc">
<p>The external multiplexer is switching inputs. Sample the cold junction temperature. </p>
</td></tr>
</table>

<p>Definition at line <a class="el" href="_a_d_c___state_machine_8h_source.html#l00060">60</a> of file <a class="el" href="_a_d_c___state_machine_8h_source.html">ADC_StateMachine.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga7eb6744d5738bf35b1cb86b44cdc99ad"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Calibrate </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Calibrates the ADC, calculating the correct values to make the calibration table valid. This can not be performed while sampling is active (the state machine must be in the state ADC_IDLE).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_a_d_c___state_machine_8c_source.html#l00526">526</a> of file <a class="el" href="_a_d_c___state_machine_8c_source.html">ADC_StateMachine.c</a>.</p>

</div>
</div>
<a class="anchor" id="gafdb90e36c49985480868585799f00b22"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_External_Muxing </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>External multiplexer switch handler.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_a_d_c___state_machine_8c_source.html#l00789">789</a> of file <a class="el" href="_a_d_c___state_machine_8c_source.html">ADC_StateMachine.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga91d632b5c373982d2554840a65e89758"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_GainCalibrate </td>
          <td>(</td>
          <td class="paramtype">PhysicalAnalogInput_t&#160;</td>
          <td class="paramname"><em>input</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Performs a system gain calibration on the specified physical input. This process can not be performed while sampling is active (the state machine must be in the state ADC_IDLE). Additionally, the parameters for the calibration must have already been set.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">input</td><td>PhysicalAnalogInput_t The physical analog input to switch to for calibration. </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_a_d_c___state_machine_8c_source.html#l00559">559</a> of file <a class="el" href="_a_d_c___state_machine_8c_source.html">ADC_StateMachine.c</a>.</p>

</div>
</div>
<a class="anchor" id="gaf9ab485b0fb6ddf69c8bfb43597ab06b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Machine_Create </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Creates the ADC state machine. Note that no initialization is done here.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_a_d_c___state_machine_8c_source.html#l00476">476</a> of file <a class="el" href="_a_d_c___state_machine_8c_source.html">ADC_StateMachine.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga6424732e3475cc653a8e7cd3598555f5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Machine_Halt </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Halt the current sampling activity of the ADC state machine and return to the idle state. This can be used to interrupt long term or continuous sampling.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_a_d_c___state_machine_8c_source.html#l00641">641</a> of file <a class="el" href="_a_d_c___state_machine_8c_source.html">ADC_StateMachine.c</a>.</p>

</div>
</div>
<a class="anchor" id="gac1ea03f0a36d3488bfb5c728b118942c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Machine_Idle </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Enter the idle state. In this state the ADC will be made to sample arbitrarily to keep the input path warmed up.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_a_d_c___state_machine_8c_source.html#l00659">659</a> of file <a class="el" href="_a_d_c___state_machine_8c_source.html">ADC_StateMachine.c</a>.</p>

</div>
</div>
<a class="anchor" id="gaabf53da7a14f298b049ed2ad432b0ed6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Machine_Init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Initializes the ADC state machine to a valid state and performs all necessary setup of the ADC.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_a_d_c___state_machine_8c_source.html#l00489">489</a> of file <a class="el" href="_a_d_c___state_machine_8c_source.html">ADC_StateMachine.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga979620e2e4743c8f5d1f053a90705841"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Machine_Input_Sample </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_analog___input__t.html">Analog_Input_t</a> **&#160;</td>
          <td class="paramname"><em>inputs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__data__types.html#ga0ecf26b576b9a54eca656b9be7ba6a06">bool</a>&#160;</td>
          <td class="paramname"><em>singleChannel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Enter the input sampling state. In this state the ADC will be made to sample a set of inputs each the specified number of times.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inputs</td><td>Analog_Input_t** Pointer to array of input data structures holding the configurations of the sampling. </td></tr>
    <tr><td class="paramname">count</td><td>uint32_t The number of samples of each input to take. 0 results in continuous sampling. </td></tr>
    <tr><td class="paramname">singleChannel</td><td>bool True if the sampling is for a single channel only. </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_a_d_c___state_machine_8c_source.html#l00687">687</a> of file <a class="el" href="_a_d_c___state_machine_8c_source.html">ADC_StateMachine.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga82e1537e4763ba13d894276ab9de1cd7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Machine_Reset </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Enter the reset state. In this state the ADC will be reset and returned to the idle state.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_a_d_c___state_machine_8c_source.html#l00771">771</a> of file <a class="el" href="_a_d_c___state_machine_8c_source.html">ADC_StateMachine.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga89889fc7c9dba41da2ab451fe5e06d68"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_Machine_Service </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Perform a periodic service of the state machine. This will subsequently call the relevant state handler.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_a_d_c___state_machine_8c_source.html#l00590">590</a> of file <a class="el" href="_a_d_c___state_machine_8c_source.html">ADC_StateMachine.c</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Mon Jul 28 2014 23:42:41 for Tekdaqc Firmware by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
